-
Notifications
You must be signed in to change notification settings - Fork 705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SDK] Add UTs for wait_for_job_conditions
#2196
[SDK] Add UTs for wait_for_job_conditions
#2196
Conversation
2743bab
to
f889b9f
Compare
Pull Request Test Coverage Report for Build 10632610394Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late reply @Electronic-Waste!
Please can you rebase your PR so we can review it ?
Signed-off-by: Electronic-Waste <2690692950@qq.com>
Signed-off-by: Electronic-Waste <2690692950@qq.com>
Signed-off-by: Electronic-Waste <2690692950@qq.com>
Signed-off-by: Electronic-Waste <2690692950@qq.com>
f889b9f
to
53c8e83
Compare
@andreyvelich Sure! I've rebased the branch to master. |
Signed-off-by: Electronic-Waste <2690692950@qq.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this @Electronic-Waste!
/assign @droctothorpe @YosiElias @kubeflow/wg-training-leads
@@ -359,6 +420,15 @@ def training_client(): | |||
yield client | |||
|
|||
|
|||
@pytest.fixture |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need separate fixture just for wait_for_job_condition or we can re-use Training client like for other tests ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I separate fixture for wait_for_job_condition
because it needs to mock function get_job
. I'm not sure whether it will affect other UTs but I can have a try:)
test_data_wait_for_job_conditions = [ | ||
( | ||
"timeout waiting for succeeded condition", | ||
{"name": TEST_NAME, "namespace": "timeout", "wait_timeout": 0}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use timeout namespace from consts: https://github.com/kubeflow/training-operator/blob/db41d3f05090387e9bf7a57375bbc20303bcf5b2/sdk/python/kubeflow/training/api/training_client_test.py#L26C1-L26C8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I'll replace that.
Signed-off-by: Electronic-Waste <2690692950@qq.com>
Thanks for the update @Electronic-Waste! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andreyvelich The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
I add some UTs for function
wait_for_job_conditions
in the Python SDKWhich issue(s) this PR fixes (optional, in
Fixes #<issue number>, #<issue number>, ...
format, will close the issue(s) when PR gets merged):Ref #2161
Checklist: